package com.cicoding.controller;/**
 * Created by Intellij IDEA.
 * User:  nuyang
 * Date:  2024/6/3
 */



import com.cicoding.service.Uf3sReaderService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: 刘明
 * @Description:
 * @Date: 2024/6/3 11:19
 */
@Slf4j
@RestController
@RequestMapping("/netty")
public class NettyTestController {

    @Autowired
    private Uf3sReaderService uf3sReaderService;



  //  @ApiOperation(value = "发送命令")
    @GetMapping("/open")
    public String open() {

        uf3sReaderService.start();
        return "发送成功";
    }

//    @ApiOperation(value = "发送命令")
    @GetMapping("/close")
    public String close() {

        uf3sReaderService.stop();

        return "发送成功";
    }


}
